package com.marvels.common.utils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.marvels.common.utils.ServerProperties;


@Component
public class CommonProperties {

	private static String configPropertiesPath;


	public  String getConfigPropertiesPath() {
		return configPropertiesPath;
	}


	@Value("${config.properties.path}")
	public  void setConfigPropertiesPath(String configPropertiesPath) {
		MarvelsLogUtil.getInstance().info(">>>>>configPropertiesPath:"+configPropertiesPath);
		CommonProperties.configPropertiesPath = configPropertiesPath;
	}

	public static String getYywDesc2() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "yywDesc2");
	}
	public static String getYywDesc3() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "yywDesc3");
	}

	public static String getDjts() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "djts");
	}

	public static String getToProName() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "toProName");
	}

	public static String getToCityName() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "toCityName");
	}

	public static String getToAccDept() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "toAccDept");
	}

	public static String getDjmtFileMaxCount() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "djmtFileMaxCount");
	}

	public static String getTimingPayment() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "timingPayment");
	}

	public static String getCollectionTask() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "collectionTask");
	}

	public static String getTimingPaymentQuery() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "timingPaymentQuery");
	}

	public static String getTimingQAPaymentQuery() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "timingQAPaymentQuery");
	}

	public static String getTimingWithholdPayment() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "timingWithholdPayment");
	}

	public static String getTimingWithholdQuery() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "timingWithholdQuery");
	}

	public static String getBhSftpUser() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "BHT_SFTP_USER");
	}

	public static String getBhSftpPassword() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "BHT_SFTP_PASSWD");
	}

	public static String getBhSftpHost() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "BHT_SFTP_HOST");
	}

	public static String getBhSftpProt() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "BHT_SFTP_PORT");
	}

	public static String getBhSftpTimeout() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "BHT_SFTP_TIMEOUT");
	}

	public static String getBhSftpBase() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "BHT_SFTP_BASE");
	}

	public static String getBhProCode() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "BHT_PRO_CODE");
	}

	public static String getUploadBasepath() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "marvels.file.upload.basepath");
	}

	public static String getBhFundExcelPath() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "bh_fund_excel_path");
	}

	public static String getIntelligentCollectionChannel() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "intelligent_collection_channel");
	}

	public static String getShortReqUrl() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "short.req.url");
	}

	public static String getLoanContractTitle() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "loan.contract.title");
	}

	public static String getLoanContractReqUrl(){
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "loan.contract.req.url");
	}

	public static String getLimitFundList() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "limit.fund.list");
	}

	/**
	 * 查询需要同步还款计划的资金源
	 * @return
	 */
	public static String getSynchronyPlanFund() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "synchrony.plan.fund");
	}

	/**
	 * 查询宝生银行放款准备状态结果查询
	 * @return
	 */
	public static String getBsyxLoanPreparationStatusQuery() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "bsyx.loan.preparation.status.query");
	}

	public static String getYYW_DESC_2() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "YYW_DESC_2");
	}


	public static String getYYW_DESC_3() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "YYW_DESC_3");
	}

	public static String getNewRepaymentFlag() {
		return ServerProperties.getValue(configPropertiesPath, "common.properties", "new.repayment.flag");
	}

}
